Interprocedural Dataflow Analysis, Part III: Newtonian Program Analysis Via Tensor Product CS701
نویسنده
چکیده
In this lecture, we summarize the interprocedural-dataflow-analysis method of Esparza et al., which generalizes Newton’s method from a numerical-analysis algorithm for finding roots of real-valued functions to a method for finding fixed-points of systems of equations over semirings. As in its real-valued counterpart, each iteration of the method of Esparza et al. solves a simpler “linearized” problem. We then move on to a recent method of Reps et al., which attempts to provide an improved technique for solving the linearized problems produced during successive rounds of Newton’s method for semirings. 1 Newtonian Program Analysis (NPA) In previous lectures, we described how interprocedural dataflow-analysis problems could be formalized as path problems in which there are two operators, extend (denoted by ⊗) and combine (denoted by ⊕). Technically, we are dealing with a semiring, which can be defined as follows: Definition 1.1 A semiring S = (D,⊕,⊗, 0, 1) consists of a set of elements D equipped with two binary operations: combine (⊕) and extend (⊗). ⊕ and ⊗ are associative, and have identity elements 0 and 1, respectively. ⊕ is commutative, and ⊗ distributes over ⊕. (A semiring is sometimes called a weight domain, in which case elements are called weights.) If fact, we need the semiring to have some additional properties—chiefly so that it makes sense to define a Kleene-star operator in the following way: ∗ : D → D is the operation a = ⊕ i∈N a, where a denotes the i term in the sequence a0 = 1 and ai+1 = a⊗ a. See App. A for the technical details. Our focus is on semirings in which ⊕ is idempotent (i.e., for all a ∈ D, a⊕ a = a). In an idempotent semiring, the order on elements is defined by a ⊑ b iff a⊕ b = b. (Idempotence would be expected in the context of dataflow analysis because an idempotent semiring is a join semilattice (D,⊕) in which the join operation is ⊕.) A semiring is commutative if for all a, b ∈ D, a⊗ b = b⊗ a. We work with non-commutative semirings, and henceforth use the term “semiring”—and symbol S—to mean an idempotent, noncommutative, (ω-continuous) semiring . To simplify notation, we sometimes abbreviate a⊗ b as ab, and we assume the following precedences for operators: ∗ > ⊗ > ⊕. We also sometimes use a ∈ S rather than a ∈ D.
منابع مشابه
Call-Site Heuristics for Scalable Context- Sensitive Interprocedural Analysis
When analyzing a program via an abstract interpretation (dataflow analysis) framework we would like to examine the program in a context-sensitive interprocedural manner. Analyzing the entire program in a manner that precisely considers interprocedural flow can lead to much more accurate results than local or context insensitive analyses (particularly for heap based analyses such as shape analys...
متن کاملPrecise Interprocedural Dataflow Analysis via Graph Reachability ( Extended
This paper shows how to find precise solutions to a large class of interprocedural dataflow-analysis problems in polynomial time. In contrast with intraprocedural dataflow analysis, where “precise” means “meet-over-all-paths”[16], a precise interprocedural dataflow-analysis algorithm must provide the “meet-over-all-valid-paths” solution. (A path is valid if it respects the fact that when a proc...
متن کاملInterprocedural Dataflow Analysis via Graph Reachability
This paper shows how a large class of interprocedural dataflow-analysis problems can be solved precisely in polynomial time. The only restrictions are that the set of dataflow facts is a finite set, and that the dataflow functions distribute over the confluence operator (either union or intersection). This class of problems includes—but is not limited to—the classical separable problems (also k...
متن کاملA Pragmatic Approach
When analyzing a program via an abstract interpretation framework we would like to analyze the program in a context-sensitive interprocedural manner. Analyzing the program in a manner that considers interprocedural flow can lead to much more accurate results than local or context-insensitive analyses. However, the computational cost (both time and memory consumption) associated with context-sen...
متن کاملInterprocedural Exception Analysis for C++
C++ Exceptions provide a useful way for dealing with abnormal program behavior, but often lead to irregular interprocedural control flow that complicates compiler optimizations and static analysis. In this paper, we present an interprocedural exception analysis and transformation framework for C++ that captures the control-flow induced by exceptions and transforms it into an exception-free prog...
متن کامل